Skip to content

fix: remove delve from public images#22389

Merged
erikburt merged 2 commits into
developfrom
fix/remove-delve-from-prod-image
May 12, 2026
Merged

fix: remove delve from public images#22389
erikburt merged 2 commits into
developfrom
fix/remove-delve-from-prod-image

Conversation

@erikburt
Copy link
Copy Markdown
Collaborator

@erikburt erikburt commented May 11, 2026

Removes unneeded dep for our publicly released images.

Changes

  • Adds 2 targets to the dockerfiles (final, debug)
    • Ensures that delve is only copied to the image when debug is target is chosen
  • Updates build-publish pipeline to target final, whereas docker-build pipeline targets debug

Testing

Builds (debug) are successful: https://github.com/smartcontractkit/chainlink/actions/runs/25699227711?pr=22389

Notes

Sonarqube is complaining with:

FROM final AS debug
^
This image might run with "root" as the default user. Make sure it is safe here.

This is not true as it inherits from final. Leaving as is.


DX-4135

@erikburt erikburt self-assigned this May 11, 2026
@erikburt erikburt added the build-publish Build and Publish image to SDLC label May 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented May 11, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cl-sonarqube-production
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube

@erikburt erikburt marked this pull request as ready for review May 12, 2026 16:54
Copilot AI review requested due to automatic review settings May 12, 2026 16:54
@erikburt erikburt requested review from a team as code owners May 12, 2026 16:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Risk Rating: MEDIUM

This PR adjusts the Chainlink Docker build to keep delve (dlv) out of publicly published images by splitting the Dockerfiles into separate final (release) and debug targets, and updating CI workflows to build the appropriate target per pipeline.

Changes:

  • Split both core/chainlink.Dockerfile and plugins/chainlink.Dockerfile into final and debug stages, copying dlv only into debug.
  • Update .github/workflows/docker-build.yml to build the debug target.
  • Update .github/workflows/build-publish.yml to build the final target for publish.

Scrupulous human review recommended:

  • Docker stage ordering/target selection: ensure no production/public pipeline (including any external/manual build paths) can accidentally build/publish the debug stage.
  • Reusable workflow input compatibility: confirm docker-target is a supported input across the specific reusable workflow refs being used.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
plugins/chainlink.Dockerfile Introduces final and debug targets; dlv is only copied into debug.
core/chainlink.Dockerfile Same final/debug split for the core image; dlv only in debug.
.github/workflows/docker-build.yml Sets Docker builds to target debug in the build workflow.
.github/workflows/build-publish.yml Sets Docker builds to target final for publish workflow.

Comment thread core/chainlink.Dockerfile
Comment thread plugins/chainlink.Dockerfile
Copy link
Copy Markdown
Collaborator

@chainchad chainchad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@erikburt erikburt added this pull request to the merge queue May 12, 2026
Merged via the queue into develop with commit 26aafa6 May 12, 2026
245 of 246 checks passed
@erikburt erikburt deleted the fix/remove-delve-from-prod-image branch May 12, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-publish Build and Publish image to SDLC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants